package service;

import dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pojo.User;

import java.util.List;

@Service("userService")
@Transactional
public class UserService {
    @Autowired
    private UserDao userDao;

    public List<User> log(Integer uid,String pwd){return userDao.login(uid, pwd);}
    public int reg(User user){return userDao.register(user);}
    public List<User> checkName(String uname){return userDao.checkName(uname);}
    public List<User> checkTel(String utel){return userDao.checkTel(utel);}
    public List<User> checkEmail(String uemail){return userDao.checkEmail(uemail);}
}
